package com.iplatform.file.function.meta.dao;


import com.iplatform.file.function.meta.domain.FieldMeta;
import com.iplatform.file.function.quartz.domain.ResourceFileBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Dair
 * @since
 */
@Mapper
public interface FieldMetaMapper {
	/**
	 * delete by primary key
	 *
	 * @param id primaryKey
	 * @return deleteCount
	 */
	int deleteByPrimaryKey(Long id);
	
	/**
	 * insert record to table
	 *
	 * @param record the record
	 * @return insert count
	 */
	int insert(FieldMeta record);
	
	int insertOrUpdate(FieldMeta record);
	
	int insertOrUpdateSelective(FieldMeta record);
	
	/**
	 * insert record to table selective
	 *
	 * @param record the record
	 * @return insert count
	 */
	int insertSelective(FieldMeta record);
	
	/**
	 * select by primary key
	 *
	 * @param id primary key
	 * @return object by primary key
	 */
	FieldMeta selectByPrimaryKey(Long id);
	
	/**
	 * update record selective
	 *
	 * @param record the updated record
	 * @return update count
	 */
	int updateByPrimaryKeySelective(FieldMeta record);
	
	/**
	 * update record
	 *
	 * @param record the updated record
	 * @return update count
	 */
	int updateByPrimaryKey(FieldMeta record);
	
	int updateBatch(List<FieldMeta> list);
	
	int updateBatchSelective(List<FieldMeta> list);
	
	int batchInsert(@Param("list") List<FieldMeta> list);
	
	
	int fieldMetaInsert(@Param("list") List<FieldMeta> list);
	
	
	List<ResourceFileBean> queryFileData(String sourceDir);
	
	
	List<FieldMeta> getHeaderInfoByTableName(String tableName);
	
	
	int deleteByTableId(Long tableId);
}